package com.yanqu.road.server.channelserver.manager.server;

import com.yanqu.road.dao.db.DbNameStrategy;
import com.yanqu.road.logic.xlogic.server.XServerNameMap;
import com.yanqu.road.server.TempMgr;

public class ChannelXServerNameMgr extends TempMgr {

    private static XServerNameMap serverNameMap = new XServerNameMap(DbNameStrategy.getChannelServerDb(), "t_n_xserver_name");

    public static XServerNameMap getServerNameMap() {
        return serverNameMap;
    }

    @Override
    public boolean save() {
        serverNameMap.save();
        return true;
    }

    @Override
    public boolean init() throws Exception {
        return reload();
    }

    @Override
    public boolean reloadConfig() throws Exception {
        return true;
    }

    @Override
    public boolean reloadData() throws Exception {
        serverNameMap.loadDb(null);
        return true;
    }

    @Override
    public boolean stop() {
        return false;
    }
}
